#include "soldier.h"

void test() {
    soldier sanDuo("XuSanduo");
    sanDuo.addGun("AK47");
    sanDuo.addBullet(10);

    int a = 0;
    while (true) {
        std::cout << "Enter non-zero num to try to fire:" << std::endl;
        std::cin >> a;
        if (a && !sanDuo.fire()) {
            std::cout << "Fire failed!" << std::endl;
            break;
        }
        std::cout << "---------------------------------" << std::endl;
    }
}

int main() {
    test();
    return 0;
}